﻿@{
    Layout = null;
}
@using Git.Framework.DataTypes;
@using Git.Framework.DataTypes.ExtensionMethods;

<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    @Html.Partial("_Title")
    @Html.Raw(ViewBag.CssFile)
</head>
<body class="dialog">
    <div class="tab-pane active" id="widget_tab1">
        <table class="dialogtab inorder_tab">
            <tr class="inorder_tr">
                <td class="inorder_tdTitle inorder_topline"><strong>入库单号</strong></td>
                <td class="inorder_tdContent inorder_topline">@ViewBag.InStorage.OrderNum
                </td>
                <td class="inorder_tdTitle inorder_topline"><strong>类型</strong></td>
                <td class="inorder_tdContent inorder_topline">@ViewBag.InStorage.InTypeLable
                </td>
                <td class="inorder_tdTitle inorder_topline"><strong>状态</strong></td>
                <td class="inorder_tdContent inorder_topline">@ViewBag.InStorage.StatusLable
                </td>
            </tr>

            <tr class="inorder_tr">
                <td class="inorder_tdTitle"><strong>供应商编号</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.SupNum
                </td>
                <td class="inorder_tdTitle"><strong>供应商名称</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.SupName
                </td>
                <td class="inorder_tdTitle"><strong>联系人</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.ContactName
                </td>
            </tr>
            <tr class="inorder_tr">
                <td class="inorder_tdTitle"><strong>关联订单号</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.ContractOrder
                </td>
                <td class="inorder_tdTitle"><strong>创建人</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.CreateUserName
                </td>
                <td class="inorder_tdTitle"><strong>创建时间</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.CreateTime
                </td>
            </tr>
            <tr class="inorder_tr">
                <td class="inorder_tdTitle"><strong>电话</strong></td>
                <td class="inorder_tdContent">@ViewBag.InStorage.Phone
                </td>
                <td class="inorder_tdTitle"><strong>备注</strong></td>
                <td colspan="3" class="inorder_tdContent">@ViewBag.InStorage.Remark
                </td>
            </tr>
            <tr class="inorder_tr">
                <td class="inorder_tdTitle"><strong>审核备注</strong></td>
                <td class="inorder_tdContent" colspan="5">
                    @if (ViewBag.Flag == "1")
                    { 
                        @ViewBag.InStorage.Reason
                    }
                    else 
                    {
                        <textarea id="txtReason"></textarea>
                    }
                </td>
            </tr>
        </table>
        <table class="table table-striped table-bordered table-hover inorder_detail" id="tabInfo">
            <thead>
                <tr class="widget-title">
                    <th class="hidden-480">产品名称</th>
                    <th class="hidden-480">产品条码</th>
                    <th class="hidden-480">规格</th>
                    <th class="hidden-480">批次</th>
                    <th class="hidden-480">单价</th>
                    <th class="hidden-480">入库数</th>
                    <th class="hidden-480">总价</th>
                    <th class="hidden-480">库位</th>
                </tr>
            </thead>
            <tbody>
                @foreach (Git.Storage.Entity.InStorage.InStorDetailEntity entity in ViewBag.Detail)
                { 
                    <tr>
                        <td title="@entity.ProductName">@entity.ProductName.SubStr(0,12,"...")</td>
                        <td>@entity.BarCode</td>
                        <td>@entity.Size</td>
                        <td>@entity.BatchNum</td>
                        <td>@entity.InPrice.ToString("0.00")&nbsp;元</td>
                        <td>@entity.Num</td>
                        <td>@entity.Amount.ToString("0.00")&nbsp;元</td>
                        <td>@entity.LocalName</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</body>
</html>
